    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 发送验证码
export const sendCode = (data:any) => {
    return service({
        url: '/user/index/sendCode',
        method: 'post',
        data
    })
};
// 注册
export const regire = (data:any) => {
    return service({
        url: '/user/index/regire',
        method: 'post',
        data
    })
};
// 登录
export const userLogin = (data:any) => {
    return service({
        url: '/user/index/userLogin',
        method: 'post',
        data
    })
};
// 获取用户权限
export const getMenuList = () => {
    return service({
        url: '/user/index/getMenuList',
        method: 'post',
        
    })
};
// 商品分页
export const getProdList = (data:any) => {
    return service({
        url: '/prod/index/prodPageList',
        method: 'post',
        data
    })
};
// 商品分页
export const brandList = (data:any) => {
    return service({
        url: '/prod/index/BrandList',
        method: 'post',
        data
    })
};
// 商品分页
export const saveBrand = (data:any) => {
    return service({
        url: '/prod/index/toAdd',
        method: 'post',
        data
    })
};
//修改状态

// demo接口1
export const updateStatus = (brandId:any) => {
    return service({
        url: '/prod/index/updateStatus/' + brandId,
        method: 'post'
    })
};
// 品牌列表
export const getBrandList = () => {
    return service({
        url: '/prod/index/getBrandList',
        method: 'post'
    })
};

//批量删除
export const batachDel = (data:any) => {
    return service({
        url: '/prod/index/deleteBatch',
        method: 'post',
        data
    })
};
//树形表单
export const treeList = (data:any) => {
    return service({
        url: '/prod/index/prodTreeList',
        method: 'post',
        data
    })
};

//批量删除
export const saveType = (data:any) => {
    return service({
        url: '/prod/index/classfitySave',
        method: 'post',
        data
    })
};
//添加商品附件
export const saveProdAtta = (data:any) => {
    return service({
        url: '/prod/index/saveAtta',
        method: 'post',
        data
    })
};
//添加商品
export const saveProd = (data:any) => {
    return service({
        url: '/prod/index/saveProd',
        method: 'post',
        data
    })
};
//订单分页
export const orderList = (data:any) => {
    return service({
        url: '/prod/index/getOrderList',
        method: 'post',
        data
    })
};
//导出
export const exportOrsder = (ids:any) => {
    return service({
        url: '/prod/index/getOrderList' +ids,
        method: 'get',
        
    })
};
//导出
export const deleteOrder = (data:any) => {
    return service({
        url: '/prod/index/deleteOrder',
        method: 'post',
        data
    })
};

//导出
export const getProdInfo = (prodId:any) => {
    return service({
        url: '/prod/index/getProdInfo/' +prodId,
        method: 'post',
        
    })
};

//商品信息列表
export const prodInfoList = (data:any) => {
    return service({
        url: '/prod/index/prodInfoList',
        method: 'post',
        data
    })
};
//添加商品详情
export const saveProdInfo = (data:any) => {
    return service({
        url: '/prod/index/saveProdInfo',
        method: 'post',
        data
    })
};
//活动分页
export const activeJoinList = (data:any) => {
    return service({
        url: '/team/index/ActivePageList',
        method: 'post',
        data
    })
};
//商家拼团活动
export const groupJoin = (data:any) => {
    return service({
        url: '/team/index/groupJoinPageList',
        method: 'post',
        data
    })
};
//参与拼团
export const groupList = (data:any) => {
    return service({
        url: '/team/index/GroupPageList',
        method: 'post',
        data
    })
};
//参与拼团
export const groupActive = (data:any) => {
    return service({
        url: '/team/index/groupActive',
        method: 'post',
        data
    })
};
//添加参与活动
export const addActiveJoin = (data:any) => {
    return service({
        url: '/team/index/saveGroupAct',
        method: 'post',
        data
    })
};
//单位展示
export const unitList = () => {
    return service({
        url: '/team/index/getDictList',
        method: 'post',
        
    })
};
//删除参与活动
export const deleteJoinAct = (joinId:any) => {
    return service({
        url: '/team/index/deleteJoinActive/' +joinId,
        method: 'post',
        
    })
};
//添加团购
export const saveGroupFun = (data:any) => {
    return service({
        url: '/team/index/addGroup',
        method: 'post',
        data
    })
};
//我的团购
export const mygroup = () => {
    return service({
        url: '/team/index/myGroup',
        method: 'post',
        
    })
};
//抽奖活动表
export const ActiveList = (data:any) => {
    return service({
        url: '/team/second/ActivePageList',
        method: 'post',
        data
    })
};
//获取抽奖记录表
export const getRecord = (data:any) => {
    return service({
        url: '/team/second/getRecordList',
        method: 'post',
        data
    })
};
//添加表单
export const addActive = (data:any) => {
    return service({
        url: '/team/second/activeAdd',
        method: 'post',
        data
    })
};
//删除抽奖信息
export const deleteById = (activeId:any) => {
    return service({
        url: '/team/second/deleteActive/' + activeId,
        method: 'post',
        
    })
};

//修改抽奖信息
export const editActive = (data:any) => {
    return service({
        url: '/team/second/updateActive',
        method: 'post',
        data
    })
};
//查看活动详情
export const getRuleInfo = (activeId:any) => {
    return service({
        url: '/team/second/getRuleListById/' + activeId,
        method: 'post',
        
    })
};
